/**
 * 学生管理接口
 */
import request from '@/utils/request'
const baseApi = '/member/student'

export function getById(param) {
/**
  {
    "id": 1
  }
 */
  const { id } = param
  return request({
    url: `${baseApi}/id`,
    method: 'get',
    params: { id }
  })
}

export function getPage(reqBody) {
/**
*
   {
	"gender": "男",
	"pageInfo": {
		"orderItems": [
		],
		"pageCount": 0,
		"pageNum": 1,
		"pageSize": 10,
		"total": 0
	},
	"realName": "",
	"stuNo": ""
}
*/
  return request({
    url: `${baseApi}/page`,
    method: 'post',
    data: reqBody
  })
}

export function saveOrUpdate(reqBody) {
/**
 {
	"address": "",
	"classId": 0,
	"collegeId": 0,
	"currentStatus": 0,
	"dateOfAdmission": "",
	"dateOfBirth": "",
	"dateOfGraduation": "",
	"degree": 0,
	"email": "",
	"gender": "",
	"id": 0,
	"idCardNumber": "",
	"idCardType": 0,
	"majorId": 0,
	"phoneNum": "",
	"photoUrl": "",
	"qqNumber": "",
	"realName": "",
	"schoolSystem": 0,
	"wechatNumber": "",
	"workAddress": ""
 }
*/
  return request({
    url: `${baseApi}/saveOrUpdate`,
    method: 'post',
    data: reqBody
  })
}

export function deleteByIds(reqBody) {
  return request({
    url: `${baseApi}/delete`,
    method: 'post',
    data: reqBody
  })
}
